import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)

const store = new Vuex.Store({
    state: {
		loginStatus:false, // false
		loginMsg:'',
		isLogin:false, // false
		appVersion:'X2',
		noteShow:false,
		oneShowStatus:true,
		/* token无感刷新 */
		wsToken:'',
		nextUpdateToken:null,
		loginUserIdentity:false,
		isRefreshing:false,
    },
    mutations: {
		loginStatusChange(state,newValue){
			state.loginStatus = newValue
		},
		isLoginChange(state,newValue){
			state.isLogin = newValue
		},
		getLoginMsg(state,newValue){
			state.loginMsg = newValue
		},
		changeNoteShow(state,newValue){
			state.noteShow = newValue
		},
		changeShowStatus(state,newValue){
			state.oneShowStatus = newValue
		},
		changeWsToken(state,newValue){
			state.wsToken = newValue
		},
		changeNextUpdateToken(state,newValue){
			state.nextUpdateToken = newValue
		},
		changeLoginUserIdentity(state,newValue){
			state.loginUserIdentity = newValue
		},
		setIsRefreshing(state, status) {
			state.isRefreshing = status;
		}
    },
    actions: {
        
    },
})

export default store
